package cate.common.table.d;

import cate.common.table.common.ParamSheet;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

public class GDIsland {
    @NoteField(value = "迷失神庙周期", detail = "天数")
    public static final int CYCLE = 2;

    @NoteField(value = "增益刷新数量")
    public static int GAIN_NUM;

    @NoteField(value = "商店商品数量")
    public static int SHOP_ITEM_NUM;

    @NoteField(value = "灵泉恢复的比例")
    public static double SPRING_HEAL_RATE;

    @NoteField(value = "复活圣殿恢复的比例")
    public static double RESPAWN_HEAL_RATE;

    @NoteField("怪物英雄最大等级")
    public static int MAX_HERO_LEVEL;

    @NoteField(value = "女娲石的物品ID")
    public static final int STONE_TID = 207000;

    @NoteField("援助英雄随机数量")
    public static final int AID_HERO_NUM = 4;

    @NoteField("层数")
    public static final int FLOOR_NUM = 3;

    @NoteField(value = "一层中的关卡数", detail = "")
    public static final int LEVEL_NUM = 11;

    @NoteField("玩家浮动系数最小值")
    public static double ROLE_MIN_COEFF;

    @NoteField("玩家浮动系数最大值")
    public static double ROLE_MAX_COEFF;

    /** 读取excel中配置的参数 */
    public static void initialize(ParamSheet paramSheet) {
        GAIN_NUM = GDParamTool.getInt(paramSheet,20001, 3);
        SHOP_ITEM_NUM = GDParamTool.getInt(paramSheet, 20002, 4);
        SPRING_HEAL_RATE = GDParamTool.getDouble(paramSheet,20003,0.3);
        RESPAWN_HEAL_RATE = GDParamTool.getDouble(paramSheet, 20004, 0.7);
        MAX_HERO_LEVEL = GDParamTool.getInt(paramSheet,20007,1000);
        ROLE_MIN_COEFF = GDParamTool.getDouble(paramSheet,20008,0.5);
        ROLE_MAX_COEFF = GDParamTool.getDouble(paramSheet,20009,1.105);
    }

    public static class Difficulty{
       public static final byte NORMAL = 1;

       public static final byte CHASM = 3;

       public static final byte DIFFICULT = 2;
    }
    
    @NoteClass("迷失神庙-格子类型")
    public static class CellType {
        @NoteField(value = "空格子")
        public static final byte BLANK = 0;

        @NoteField(value = "普通怪物")
        public static final byte GUARD = 1;

        @NoteField(value = "精英怪物")
        public static final byte ELITE_GUARD = 2;

        @NoteField(value = "BOSS")
        public static final byte BOSS = 3;

        @NoteField(value = "增益")
        public static final byte GAIN = 4;

        @NoteField(value = "援助英雄")
        public static final byte AID_HERO = 5;

        @NoteField(value = "灵泉")
        public static final byte HEAL = 6;

        @NoteField(value = "复活圣殿")
        public static final byte REVIVE = 7;

        @NoteField(value = "坊市")
        public static final byte MALL = 8;

        /** 是否属于初始化就能构建的格子（比如技能格子就不是） */
        public static boolean isInitCell(int type) {
            switch (type) {
                case BLANK:
                case GUARD:
                case ELITE_GUARD:
                case BOSS:
                case AID_HERO:
                case HEAL:
                case REVIVE:
                case MALL:
                    return true;
                default:
                    return false;
            }
        }

        /** 是否属于战斗格子 */
        public static boolean isFightCell(int type) {
            switch (type) {
                case GUARD:
                case ELITE_GUARD:
                case BOSS:
                    return true;
                default:
                    return false;
            }
        }
    }

}
